package br.com.itc.componentes.util
{
	import mx.effects.Fade;
	
	public class FadeUtil
	{
		public function FadeUtil()
		{
			
		}
		
		public static function fadeAparecer(target: Object, alphaFrom: Number = 0.0, alphaTo: Number = 1.0, duracao: Number = 500): void {
			var fade: Fade = new Fade();
			fade.target = target;
			fade.alphaFrom = alphaFrom;
			fade.alphaTo = alphaTo;
			fade.duration = duracao;
			fade.play();
		}

		public static function fadeSumir(target: Object, alphaFrom: Number = 1.0, alphaTo: Number = 0.0, duracao: Number = 500): void {
			var fade: Fade = new Fade();
			fade.target = target;
			fade.alphaFrom = alphaFrom;
			fade.alphaTo = alphaTo;
			fade.duration = duracao;
			fade.play();
		}
	}
}